package com.taobao.api.request;

import java.util.Map;

import com.taobao.api.ApiRuleException;
import com.taobao.api.TaobaoRequest;
import com.taobao.api.internal.util.RequestCheckUtils;
import com.taobao.api.internal.util.TaobaoHashMap;
import com.taobao.api.response.InventoryAuthorizeGetallResponse;

/**
 * TOP API: taobao.inventory.authorize.getall request
 * 
 * @author auto create
 * @since 1.0, 2013-07-21 16:38:14
 */
public class InventoryAuthorizeGetallRequest implements TaobaoRequest<InventoryAuthorizeGetallResponse> {

  private Map<String, String> headerMap = new TaobaoHashMap();
  private TaobaoHashMap       udfParams;                      // add
                                                              // user-defined
                                                              // text parameters
  private Long                timestamp;

  /**
   * 商品编码列表，使用”,”分割多个号码，最大50个
   */
  private String              scItemIdList;

  /**
   * 指定的商家仓库编码，使用”,”分割多个仓库
   */
  private String              storeCodeList;

  public void setScItemIdList(String scItemIdList) {
    this.scItemIdList = scItemIdList;
  }

  public String getScItemIdList() {
    return this.scItemIdList;
  }

  public void setStoreCodeList(String storeCodeList) {
    this.storeCodeList = storeCodeList;
  }

  public String getStoreCodeList() {
    return this.storeCodeList;
  }

  public Long getTimestamp() {
    return this.timestamp;
  }

  public void setTimestamp(Long timestamp) {
    this.timestamp = timestamp;
  }

  public String getApiMethodName() {
    return "taobao.inventory.authorize.getall";
  }

  public Map<String, String> getTextParams() {
    TaobaoHashMap txtParams = new TaobaoHashMap();
    txtParams.put("sc_item_id_list", this.scItemIdList);
    txtParams.put("store_code_list", this.storeCodeList);
    if (this.udfParams != null) {
      txtParams.putAll(this.udfParams);
    }
    return txtParams;
  }

  public void putOtherTextParam(String key, String value) {
    if (this.udfParams == null) {
      this.udfParams = new TaobaoHashMap();
    }
    this.udfParams.put(key, value);
  }

  public Class<InventoryAuthorizeGetallResponse> getResponseClass() {
    return InventoryAuthorizeGetallResponse.class;
  }

  public void check() throws ApiRuleException {
    RequestCheckUtils.checkNotEmpty(scItemIdList, "scItemIdList");
  }

  public Map<String, String> getHeaderMap() {
    return headerMap;
  }
}
